package demo1;

public class demo2 {
    static class MyRunnable implements Runnable{
        //新建线程类实现Runnable接口
        @Override
        public void run() {
            System.out.println("这里是线程运行的代码");
        }
    }

    public static void main(String[] args) {
       Thread thr1 = new Thread(new MyRunnable());
       thr1.start();
    }
}
